package com.winhxd.b2c.common.domain.customer.enums;

import java.util.Map;
import java.util.TreeMap;

/**
 * @author: lishaoping
 * @date: 2019年1月10日16:07:27
 */
public enum DeliveryInfoEnum {
    /**
     * 配送方式  0有效 1无效
     */
    EFFICTIVE(0, "有效"),
    VALIDATE(1, "无效");

    private Integer code;
    private String desc;

    DeliveryInfoEnum(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static Map<Integer, String> getDescMap() {
        Map<Integer, String> map = new TreeMap<>();
        for (DeliveryInfoEnum deliveryInfoEnum : values()) {
            map.put(deliveryInfoEnum.getCode(), deliveryInfoEnum.getDesc());
        }
        return map;
    }

}
